package com.easipass.epug.controller;

import com.easipass.epug.entity.DataTable;
import com.easipass.epug.entity.User;
import com.easipass.epug.service.DataTableService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * Created by Wangxuyang on 16/6/3.
 */
@Controller
@RequestMapping(value="/datatable")
public class DataTableController {
    @Resource(name="dataTableService")
    private DataTableService dataTableService;

    @RequestMapping("/getAll")
    public String getAll(HttpServletRequest request)
    {
        List<DataTable> datas = this.dataTableService.getAll();
        request.setAttribute("datas", datas);
        return "datatables";
    }
}
